package com.itheima.dao;

import com.itheima.domain.SysLog;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ISysLogDao {


    /**
     * 添加日志信息到数据库
     *
     * @param sysLog
     */
    @Insert("insert into syslog(visitTime,username,ip,url,executionTime,method) values(#{visitTime},#{username},#{ip},#{url},#{executionTime},#{method})")
    void insertSysLog(SysLog sysLog);

    /**
     * 查询所有日志信息
     *
     * @return
     */
    @Select("select * from sysLog")
    public List<SysLog> findAllSysLog();

}
